<?php
if (!defined('_PS_VERSION_'))
  exit;
 
class PhNews extends Module
  {
	public function __construct()
    {
		$this->name = 'phnews';
		$this->tab = 'Test';
		$this->version = 1.0;
		$this->author = 'Hayani Mehdi';
		$this->need_instance = 0;
	 
		parent::__construct();
	 
		$this->displayName = $this->l('Pharmacie New Products');
		$this->description = $this->l('Module pour nouveaux produits');
    }
 
	public function install()
	{
		if (parent::install() == false OR !$this->registerHook('leftColumn'))
			return false;
		return true;
	}
	
	public function hookLeftColumn($params)
	  {
		  global $smarty;

		  return $this->display(__FILE__, 'phnews.tpl');
	  }
	 
	public function hookRightColumn($params)
	  {
		return $this->hookLeftColumn($params);
	  }
	
	public function hookHeader($params)
	  {
		return $this->hookLeftColumn($params);
	  }
	
	public function hookHome($params)
	  {
		return $this->hookLeftColumn($params);
	  }
	

	public function uninstall()
	{
		if (!parent::uninstall())
			Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'phnews`');
		parent::uninstall();
	}
  	

  }
  
?>